package com.sunseaypw.web.serverlet;

import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

@WebServlet(urlPatterns="/hello")
public class HelloServerlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) 
            throws ServletException, java.io.IOException {
        //将此路径请求外包给 worker啊
        req.getRequestDispatcher("/hello/worker").forward(req, resp);
    }
}
